unit CheckNoteFrm;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2013White, dxSkinscxPCPainter,
  dxLayoutContainer, dxLayoutControl, cxContainer, cxEdit,
  dxLayoutcxEditAdapters, dxLayoutControlAdapters, Vcl.Menus, Vcl.StdCtrls,
  cxButtons, Vcl.Touch.Keyboard, cxMemo, cxSpinEdit, cxTextEdit, cxMaskEdit,
  cxDropDownEdit, dxLayoutLookAndFeels, cxClasses;

type
  TCheckNoteForm = class(TForm)
    lgLayoutControl1Group_Root: TdxLayoutGroup;
    lc1: TdxLayoutControl;
    cbb_HotType: TcxComboBox;
    itm_lc1Item1: TdxLayoutItem;
    SpinEdit_TimeOut: TcxSpinEdit;
    itm_lc1Item11: TdxLayoutItem;
    mmo_Note: TcxMemo;
    itm_lc1Item12: TdxLayoutItem;
    tchkybrd1: TTouchKeyboard;
    itm_lc1Item13: TdxLayoutItem;
    lglc1Group1: TdxLayoutGroup;
    btn_Ok: TcxButton;
    itm_lc1Item14: TdxLayoutItem;
    btn_Cancel: TcxButton;
    itm_lc1Item15: TdxLayoutItem;
    btn_lang: TcxButton;
    itm_lc1Item16: TdxLayoutItem;
    dxlytlkndflst1: TdxLayoutLookAndFeelList;
    dxlytcxlkndfl1: TdxLayoutCxLookAndFeel;
    procedure btn_langClick(Sender: TObject);
    procedure SpinEdit_TimeOutEnter(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  CheckNoteForm: TCheckNoteForm;

implementation

{$R *.dfm}

procedure TCheckNoteForm.btn_langClick(Sender: TObject);
begin
  ActivateKeyboardLayout(HKL_NEXT, 0);
  mmo_Note.SetFocus;
end;

procedure TCheckNoteForm.SpinEdit_TimeOutEnter(Sender: TObject);
var
  AEdit: TcxCustomEdit;
begin
  AEdit:= (Sender as TcxSpinEdit);
  if AEdit.EditValue = 0 then
    if AEdit.InnerControl.HandleAllocated then
     PostMessage(AEdit.InnerControl.Handle, EM_SETSEL, 0, -1);
end;

end.
